<template>
  <div class="fragment-details">
    <div class="logo">
      <img src="../../assets/logo.png" alt="" />
    </div>
    <h1 class="shop-name">明月阁西餐厅</h1>
    <div class="relation-phone common">
      联系电话: <span style="color: #e47105; font-size: 16px">xxxxxxxxx</span>
    </div>
    <div class="announcement common" @click="unfoldHandle">
      <van-icon name="arrow-down" class="unfold" />
      公告: 美味的邂逅, 浪漫的气息~明月阁西餐厅（22年11月1日）开业
      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    </div>
  </div>
</template>

<script>
export default {
  name: "fragment-details",
  data() {
    return {};
  },
  methods: {
    unfoldHandle() {
      console.log("展开");
    },
  },
};
</script>

<style lang="scss">
.fragment-details {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  height: 70%;
  background-color: #fff;
  border-radius: 10px;
  padding: 15px 10px;
  box-sizing: border-box;
  overflow: hidden;

  .shop-name {
    margin: 0;
    padding: 0;
    font-size: 20px;
  }

  .logo {
    float: right;
    width: 50px;
    height: 50px;
    padding-right: 20px;
  }

  .relation-phone {
    margin: 5px 0;
  }

  .announcement {
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 7px;

    .unfold {
      position: absolute;
      top: 3px;
      right: 0;
    }
  }

  .common {
    font-size: 12px;
    color: rgb(153, 153, 153);
  }
}
</style>
